import request from '@/utils/request'

// 查询实有人口列表
export function listResidents(query) {
  return request({
    url: '/system/residents/list',
    method: 'get',
    params: query
  })
}

// 查询实有人口详细
export function getResidents(id) {
  return request({
    url: '/system/residents/' + id,
    method: 'get'
  })
}

// 验证身份证号是否重复 飒飒
export function getResidentsByIdNumber(idNumber) {
  return request({
    url: '/system/residents/getResidentsByIdNumber/' + idNumber,
    method: 'get'
  })
}

// 新增实有人口
export function addResidents(data) {
  return request({
    url: '/system/residents',
    method: 'post',
    data: data
  })
}

// 修改实有人口
export function updateResidents(data) {
  return request({
    url: '/system/residents',
    method: 'put',
    data: data
  })
}

// 删除实有人口
export function delResidents(id) {
  return request({
    url: '/system/residents/' + id,
    method: 'delete'
  })
}

// 查询人员类型数量
export function getResidentTypeNumber(id) {
  return request({
    url: '/system/residents/getResidentTypeNumber/' + id,
    method: 'get'
  })
}
